class Solution {
public:
    bool isPerfectSquare(int num) {
        double ans=exp((log10(num)/log10(exp(1)))/2);
        return abs(ans-round(ans))<0.0000001;
    }
};